home *** CD-ROM | disk | FTP | other *** search
- Dr. Bob's Utilities
- A Company Devoted to Testing Your Integrity
-
- ADMIN.DOC ** V1.0 1-19-85 **
-
- If you use this program regularly and would like to contribute to my
- efforts and support work on future utilities -
-
- Send $15.00
- to:
-
- Dr. Bob's Utilities
- 444 Maple Lane
- St. Paul MN, 55112 (let me know of other utilities you would like)
-
- Registered users will receive information about new uses, updates, new utility
- programs, etc. They may also ask questions by mail or
-
- Terrapin Station BBS
- 612 623-1156
- (A truly magnificent BBS).
- ******* HOURS: weekdays after 6 pm CST - weekends 24 hrs *******
-
- Leave Terrapin RBBS messages for Bob Ray (me).
-
- A new release is planned which should be a significant improvement over this
- one. One change will be that most of the .EXE files of this version will be
- combined into one program. This new release will assume that your system is
- working with the current versions so it can make assumptions about the format
- of your directories. It will also include various other goodies. Once I have
- some indication of support for my efforts (people become registered users),
- I will finish the new version and release it.
-
-
- ******************************************************************************
- ADMIN:
- These programs in conjunction with STREW.EXE do almost all of your RBBS
- directory maintenance. To do your maintenance you simply type:
-
- MAINTAIN ALPHADIR DATEDIR
-
- where ALPHADIR is the name of your alphabetical master directory
- and DATEDIR is the name of you date-sorted master directory.
-
- DISCLAIMER:
- These utilities have no bugs that I know of (although you can easily
- produce some apparent bugs if you don't read this document carefully).
- They are sold without warranty of any kind. Use them at your own risk.
-
- THE FIRST TIME:
- Before you use these utilities, do a COPY DIR??.* DIR??.BAK
- (safety first). After you are COMPLETELY convinced that
- things are ok, you can delete the .BAK files.
-
- Then do the following:
-
- 1. Your directory headers, (if any) must have a character in the
- left-most column that has an ASCII value less than 48. The
- space, | * < > and : characters are all fine. If you
- have a header made of just text, the easiest solution is to use a
- text editor to insert a space at the beginning of each line.
- Other good choices for the first character are | and *.
- Otherwise your header will be sorted along with your filenames,
- and may be trashed by various of these utilities.
-
- 2. Your should run EXP.EXE on all your RBBS sub-directories if you
- want to use expanded filenames. Otherwise your filenames
- will become inconsistent. This only needs to be done once.
-
- 3. If you have used anything other than a "-" as a the delimiter
- in your dates, use a text editor to change to "-".
-
- 4. If your upload directory is not called DIR99, rename it to DIR99.
-
- 5. These utilities will behave unpredictably on files with Tabs in them.
- Remove all tabs before running any of these programs. Tabs are
- visible in FRED (although FRED tends to go crazy when you use it on
- files with tabs in them).
-
- 6. If you don't have master directories and would like them, do the following:
-
- COPY DIR10+DIR20+DIR30 MASTER (using the names of your files)
-
- You probably don't want to include DIR99. This file (MASTER)
- will have your headers at various points throughout.
- If you have multiple line descriptions of some files, you
- will need to do some work to prevent them from being split
- up or re-ordered during sorting. The easiest method is to
- eliminate them. If you feel you must have multiple line
- descriptions, you can preserve them by using the complete file
- name for each line and doing a little planning:
-
- FILE ASC description line1
- FILE COM| description line2
- FILE. COM| description line3
-
- Notice the use of "|" to make sure they are sorted in the correct
- order. Another approach is to add the multiple line descriptions
- after you see how the lines will be sorted (making sure that your
- descriptions won't change the sort order).
- The solution is different for date-sorted directories. SYSRTRD.EXE
- sorts on the date and (if the dates are the same) on the right side
- of the line. Unless care is taken this may separate files you
- want to keep together. If you want to keep files with the same name
- together, sort the dir alphabetically before date-sorting it. Then
- make sure your multiple line description lines are in alphabetical
- order. The easiest way to do this is to space over each succeeding
- line:
-
- FILE ASC 01-01-85 description line one
- FILE COM 01-01-85 description line two
- FILE DOC 01-01-85 description line three
-
-
- USORT MASTER
- Using USORT.EXE will move up all your headers to the
- beginning of the file. For this reason USORT.EXE is not
- used in regular RBBS dir maintenance. USORT.EXE, unlike
- the other programs in this set, does not replace your
- infile but rather puts its output in a file with the same
- name but with the extension .SRT (e.g. MASTER.SRT).
- MASTER.SRT will have all the various headers from your
- RBBS sub-directories piled up at the beginning. You can then
- use an editor to remove them and add a new header for your
- master directory. Save two versions, one for your
- alphabetical dir one for your date-sorted dir, each with the
- appropriate header. (See #1 above for info about header.) Delete
- MASTER.* and then run SYSRTA.EXE and SYSRTRD.EXE on the two
- files. don't forget which is the date and which the alpha file.
-
- At this point you may have duplicate entries for some files (if they
- were listed in more than one RBBS sub-directory). You will need to
- use an editor to remove them. I hope to have a program that will do this
- for you in the near future (RMDUPES.EXE).
-
- These steps will only have to be done once. Once you have master
- directories, MAINTAIN.BAT will keep them up to date.
-
- Once you have done these, the utilities will take care of almost
- all of your RBBS Directory maintenance.
-
- WARNINGS:
-
- 1. The utilities have several expectations and may get a little crazy
- if they are not met. See the section above "THE FIRST TIME:" for a
- description of the necessary conditions.
-
- 2. The maximum file handled by these utilities is a little over 50k.
- VERY bad things could happen if you try to process a file larger than
- this. Future releases will exit gracefully if a file is too large. Be
- warned - this release will not. The batch file MAINTAIN.BAT will
- show you the file size before working on the file. Abort with CTRL-C if
- the file is too large. (This pause and warning occur only for your
- master file lists - it is assumed that your RBBS sub-directories are
- less than 50k.)
-
- 3. The dates in dir99 are the dates the files were uploaded. If these
- dates go in the sub-directories a while after they were uploaded, users
- who try to get a listing of new files with the N(ew) command will not
- hear about them if they called while the files were on dir99. The next
- release of these utilities will correct this by putting the current
- system date into each line of dir99 when the update is done.
-
- 4. The batch file uses dir0 as a temporary holding file for the dir99
- header. If you have a dir0, either rename it or change the line in the
- batch file. It (the filename used by MAINTAIN.BAT) should have a "dir"
- prefix so you can "strew" to it.
-
- WHAT THE UTILITIES DO:
- The utilities DO NOT touch your dir headers as long as the first
- character of each line of the header has an ASCII value less than
- 48 (space . * | = + are all ok). The sort utilities SYSRTA.EXE and
- SYSRTRD.EXE report the number of files in each dir (ignoring the header,
- if any). 50k limit on file size. DON'T use them on larger files.
-
- The EXP.EXE program will automatically expand the filenames
- in a dir file so that all the extensions line up:
-
- FILE.EXE
- FILE.C
- FILENAME.DOC
-
- will change to
-
- FILE EXE
- FILE D
- FILENAME DOC
-
- The rest of the line will not be changed.
-
- STREW.EXE is a utility for sending dir99 entries to your RBBS
- sub-directories. It is not included in this set of utilities since I
- did not write it. Future releases of these utilities may have something
- like STREW built in. For now, the utilities will not work well without
- it and if you don't have it you can download it from the Terrapin
- Station RBBS (see hours and number above). Using STREW.EXE with these
- utilities is described below.
-
- SYSRTA.EXE is an alphabetical sort that ignores case and does not touch your
- dir header (if any). It sorts files in memory and will hold files up to 50k.
- Bad craziness may result if you try to sort a file larger than this.
- MAINTAIN.BAT will show you the file size and warn you about this. Use
- CTRL-C to abort if the file size is too big. If this file size is a problem
- there may be several solutions:
-
- 1. Use V. Buerg's sort filter (sortf.lbr available from Terrapin BBS).
- 2. Split the file into parts.
- 3. Wait for me or someone else to compile the utilities with a large
- memory model compiler.
- 4. Wait for me to write a program that will split the file into parts,
- perform the maintenance, then merge-sort it back to the master
- file (not likely to happen any time soon).
- 5. Punt.
-
- SYSRTRD.EXE sorts in reverse date order so the new files appear at the top
- of the list. SYSRTRD.EXE assumes that a "-" is used as the date separator.
- If you have used something else SYSRTRD.EXE will not work unless you use
- an editor to change to a '-'. SYSRTRD.EXE will behave unpredictably if
- another delimiter is used. SYSRTRD.EXE assumes the date is in standard
- MM-DD-YY form but is smart enough to put 01-01-85 above 09-09-84 and changes
- 1-20-85 to 01-20-85.
- 50k limit here too.
-
- GETHED.EXE extracts the header from dir99 and places it in a file called
- DIR99.HED. This is so DIR99.HED can be copied to DIR99 and DIR99.HED
- deleted at the end of the batch file. This leaves a new, empty DIR99
- for new uploads.
- 50k file limit.
-
- USORT.EXE is a standard alphabetical sort utility except that it ignores
- upper and lower case. It DOES NOT ignore header material and therefore
- should not be used unless you want your header sorted in with the rest
- of your file. It is handy for sorting a book index or other alphabetical
- list where you want upper and lower case entries treated the same.
- Its use in creating a master directory the first time is described
- in the section above (THE FIRST TIME:). Another use for USORT would be
- to help get rid of the headers in a file with multiple headers spread
- through it. Usort would move them all to the front of the file where
- they could easily be removed. 50k file limit.
-
- MAINTAIN.BAT is the batch file that takes care of business for you. It is
- invoked with MAINTAIN ALPHADIR DATEDIR.
-
- Here is what it looks like:
-
- echo on
- cls
- rem RBBS File Maintenance Batch File
- rem .
- rem from Dr. Bob's Utilities
- rem .
- rem .
- rem call with MAINTAIN ALPHADIR DATEDIR
- rem where ALPHADIR is the name of your master alphabetical dir
- rem and DATEDIR is the name of your master date-sorted dir
- rem .
- rem e.g. MAINTAIN DIR90 DIR91
- rem .
- pause
- exp dir99
- copy dir99 dir99.bak
- gethed dir99
- copy dir99.hed dir0
- del dir99.hed
- strew rbbs
- sysrta dir10 dir20 dir30 ...put the names of your RBBS sub-directories here
- dir %1
- pause ABORT IF SIZE of %1 is > 50,000
- sysrta %1
- dir %2
- pause ABORT IF SIZE of %2 is > 50,000
- sysrtrd %2
- rename dir0 dir99
- pause About to delete dir99.bak (abort with Ctrl-C)
- del dir99.bak
- rename dir0 dir99
-
- CHANGING MAINTAIN.BAT
-
- MAINTAIN.BAT can be changed with edlin, FRED, or any ASCII
- oriented text editor.
-
- BE SURE TO CHANGE the line with DIR10 DIR20 DIR30 so that it
- contains the names of your RBBS sub-directories. You can use
- several lines if necessary as long as each starts with SYSRTA.
- If you would rather have your sub-directories in reverse date order,
- change sysrta to sysrtrd in the batch file.
-
- If you do not want to have a date-sorted directory, simply delete all
- lines with %2 in them and use MAINTAIN ALPHADIR to start up.
- (Replace "ALPHADIR" with the name of your dir.)
-
- If you do not want to have an alpha-sorted directory, delete all lines
- with %1 in them and change "%2" to "%1" wherever it appears. Use
- MAINTAIN DATEDIR to start up. (Replace "DATEDIR" with the name of your dir.)
-
- If you want all your RBBS sub-directories in reverse date order, use
- SYSRTRD.EXE to sort all of them.
-
- If you don't want the filename expanded, remove the line with exp.
-
- If you feel daring, remove the "PAUSE" statements
-
-
- USING STREW WITH THESE UTILITIES:
- STREW.EXE will let you specify RBBS-sub-directories to send the new
- files in dir99 to. Type C to configure strew and specify RBBS as the
- name of the config file. Specify DIR99 as the upload directory and
- specify the prefix for the RBBS sub-directories (usually DIR).
- IMPORTANT: specify the names of your two master directories,
- (or one if you only want one) as the default files to "strew" to.
- For example, if DIR90 and DIR91 are your two master directories, specify
- 90,91 as the default file to strew to and DIR as the default prefix. This
- will automatically append all the new files to the end of the two master
- directories.
- You may want to increase the size of the "strew" field in STREW if
- you will be "strewing" the file to several different directories.
- If you would like to leave some files in dir99 instead of sending
- them to RBBS sub-directories, simply "strew" them to dir0. Dir0
- is a temporary file holding the dir99 header. It is later renamed
- to dir99.
-
-
- ABOUT THE SORT ALGORITHM:
- These utilities use a modified quicksort algorithm to sort the lines
- of each file. The lines are read into a continuous buffer and, as they
- are read, an array of pointers is set to point to the beginnings of the
- lines. The sort function calls the compare and swap functions. The swap
- function swaps the pointers to the two lines, leaving the lines where they
- are. The compare function is tailored to the particular sorting task.
- I'm not sure, but I think the quicksort is also modified to improve
- performance on a file which is already mostly sorted (as most RBBS files
- are). Future releases will probably have a single sort program which
- accepts flags on the command line that will determine its behavior.
- e.g. SYSORT /HRD DIR90
- would sort DIR90 in reverse date order and ignore headers.
-
- WHAT'S LEFT FOR YOU TO DO:
- You will still have to tell STREW which directories to send the
- files to.
- MAINTAIN will take care of all the normal RBBS DIR maintenance
- I know of except that it does not update the message in your header
- (if any) giving the number of files and the date of revision. If
- everyone will agree to put a line like the following as line three
- of the header:
-
- * Contains ### Files - Last Update ##-##-##... *
-
- and let me know that this is ok, I will have the new version replace this
- line with the correct info. (It won't touch the border, it will just go
- to the third line, move over a few spaces and punch in the message with
- a few leading and trailing spaces for good measure.)
-
- EXAMPLE HEADER:
- ******************************************************************************
- * Directory 90 - Lists all files *
- * Contains ### Files - Last Update ##-##-## *
- * Reverse Date Order *
- ******************************************************************************
-
- have fun,
-
-
- Dr. Bob aka Bob Ray (leave Terrapin BBS messages for Bob Ray)
- ** see hours and number above **
-
- ***************************************************************************
-
- ** see hours and number above **
-
- ****************************************************